package demo1108.demo02;

/**
 * @author JYH
 * @version 1.0
 * @date 2022/11/8 16:32
 */
public class NoteBookFactory {
    public static Notebook createNoteBook(String type){
        if (type.equals("HuaWei")){
            return new HuaWeiNoteBook();
        }else if (type.equals("ShenZhou")){
            return new ShenZhouNotebook();
        }else{
            return null;
        }
    }
}
